import 'package:flutter/material.dart';
import 'package:table_calendar/table_calendar.dart';

class MyCalendar extends StatefulWidget {
  const MyCalendar({Key? key}) : super(key: key);

  @override
  State<MyCalendar> createState() => _MyCalendarState();
}

class _MyCalendarState extends State<MyCalendar> {
  CalendarFormat _calendarFormat = CalendarFormat.month;

  @override
  Widget build(BuildContext context) {
    // 
    return TableCalendar(
      locale: 'zh_CN',
      firstDay: DateTime.now(),
      lastDay: DateTime.utc(
        DateTime.now().year + 1,
        DateTime.now().month + 1,
        28,
      ),
      focusedDay: DateTime.now(),
      calendarFormat: _calendarFormat,
    );
  }
}
